package cn.ethan.demo.design;

/**
 * 线程不安全的单例
 *
 * @author 张俊辉
 */
public class Singleton_01 {

    private static Singleton_01 instance;

    private Singleton_01() {}

    public static Singleton_01 getInstance() {
        if (instance != null) {
            return instance;
        }
        instance = new Singleton_01();
        return instance;
    }
}
